<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use \yii\helpers\Url;

?>

<div style="margin:20px 0;"></div>
<table class="easyui-datagrid" id="dg" title="文章列表" style="height:100%;min-height: 750px;"
       data-options="rownumbers:true,singleSelect:true,pagination:true,url:'<?=Url::toRoute('article/data') ?>',method:'get',toolbar:'#tb',footer:'#ft'">
    <thead>
    <tr>
        <th data-options="field:'id',checkbox:true"></th>
        <th data-options="field:'account_id',width:80">accountid</th>
        <th data-options="field:'title',width:100">标题</th>
        <th data-options="field:'subhead',width:80,align:'right'">副标题</th>
    </tr>
    </thead>
</table>
<div id="tb" style="padding:2px 5px;">
    <div style="margin-bottom: 20px;">
        关键词: <input class="easyui-textbox"  style="width:110px">


        <a href="#" class="easyui-linkbutton" iconCls="icon-search">Search</a>
    </div>
    <div>
        <a href='<?=Url::toRoute('article/add-view') ?>' class="easyui-linkbutton" iconCls="icon-add" plain="true"></a>
        <a href="#" class="easyui-linkbutton  data-row-edit" iconCls="icon-edit" plain="true"></a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"></a>
    </div>
</div>
<div id="ft" style="padding:2px 5px;">
</div>
<?php $this->beginBlock('scriptSelf'); ?>
<script>
    $(document).ready(function(){
        $('.data-row-edit').on('click',function(){
            var row =  $("#dg").datagrid('getSelected');
            console.log(row);
        })
    });
</script>
<?php $this->endBlock();?>






